package com.jungle.bfi.service.voucher.impl;

import com.jungle.base.domain.bo.BaseUserBo;
import com.jungle.base.service.AbstractService;
import com.jungle.bfi.domain.bo.VoucherTemplateBo;
import com.jungle.bfi.entity.VoucherTemplatePo;
import com.jungle.bfi.service.voucher.VoucherTemplateService;
import org.n3r.idworker.Sid;
import org.springframework.stereotype.Service;

/**
 * [voucher]凭证模板实体类
 * @author jungle
 * @since 2025-02-18 09:59:41
 */
@Service
public class VoucherTemplateServiceImpl extends AbstractService<VoucherTemplatePo, VoucherTemplateBo, String> implements VoucherTemplateService {

    @Override
    protected String getBoId(VoucherTemplateBo bo) {
        return bo.getId();
    }

    @Override
    protected String newPoId() {
        return Sid.nextShort();
    }

    @Override
    protected VoucherTemplatePo createPo(VoucherTemplateBo bo, BaseUserBo userBo) {
        return mapper.map(bo, VoucherTemplatePo.class);
    }
}
